import {Form, Input} from "antd";
import BaseEntity from "@/type/BaseEntity";
import InputProps from "@/common/form/porps";
const { TextArea } = Input;

interface IProps<T extends BaseEntity> extends InputProps<T>{
    /**
     * 文本域的列数
     */
    cols?: number,
    /**
     * 文本域的行数
     */
    rows?: number,
}

const InputTextArea =<T extends BaseEntity> (props: IProps<T>) => {

    return (
        <Form.Item<T> name={props.name as any} label={props.label} required={props.required}>
            <TextArea cols={props.cols} rows={props.rows}/>
        </Form.Item>
    );
};

export default InputTextArea;